#!/usr/bin/perl

=head1 NAME

Test cases fpr AFX::ARF

=cut

##############################################################################
# Globals
#
use lib 'lib';
use strict;
use warnings;

use Test;

## BEGIN block
BEGIN { plan tests => 2 }

## Load module
use AFX::ACF;
use AFX::ASF;
use AFX::Process;
use AFX::ARF;

## Helpful notes.  All note-lines must start with a "#".
print "# Checking AFX::ARF version $AFX::ARF::VERSION\n";

## Open ACF
my $acf = new AFX::ACF;

## Set Site's identifier
my $site_id = $acf->open_sitefile();

## Set default site_mach
my $site_mach = 'LNX';

## Get default machine for specified
my $machine_default = $acf->get_machine($site_mach);

## Open ASF
my $asf = new AFX::ASF( $acf, $site_id );

## Add machine into default ASF
my $machine = $asf->add_machine( $machine_default, $site_mach, $site_mach );

## Create Process
my $process = new AFX::Process( $acf, $asf, 'config' );

## Create new ARF
my $arf = new AFX::ARF( $process, $machine, 'audit' );

## Try to update ARF
ok($arf->update());

## Try to open ARF
ok($arf->open());
